#include <stdio.h>
#include "oled.h"
#include "gui.h"
#include "test.h"
#include "../../temp_humi_demo/temp.h"
#include <stdlib.h>

void printString(int x,int y,int font_size,char *str){
    char *tmp_str = str;
    int cur_x=x;
    int cur_y=y;
    while(*tmp_str != '\0')
    {

        unsigned char csize = font_size;

        if(tmp_str[0] > 0){
           if(font_size == 16)
            {
                csize = font_size/2;
            }
            else if(font_size == 8)
            {
                csize = font_size/2+2;
            }
      
            GUI_ShowChar(cur_x,cur_y,tmp_str[0],font_size,1);
            tmp_str++;
        }else{

            if(font_size == 16)
            {
                GUI_ShowFont16(cur_x,cur_y,tmp_str,1);
            }else if(font_size == 24){
                //自己实现
                
            }
            tmp_str +=3;
        
        }
        
        cur_x += csize;
        if(cur_x > WIDTH-font_size)
		{
			cur_x=0;
			cur_y+=font_size;
		}
    }
}

// width: 82, height: 64
const unsigned char dj[]= { 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf8,0x00,0x00,0x00,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf8,0x00,0x00,0x80,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf0,0x00,0x00,0x80,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf0,0x00,0x00,0x00,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xe0,0x00,0x00,0x80,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xe0,0x00,0x00,0x80,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xc0,0x00,0x00,0x80,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xc0,0x00,0x00,0x80,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x80,0x00,0x00,0x80,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x80,0x00,0x00,0x80,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x80,0xff,0xff,0xff,0xff,0xff,0xff,0xfe,0x00,0x00,0x01,0x80,0xff,0xff,0xff,0xff,0xff,0xff,0xfe,0x00,0x16,0x00,0x00,0xff,0xff,0xff,0xff,0xff,0xff,0xfe,0x00,0x16,0x00,0x00,0xff,0xff,0xf0,0x0f,0xff,0xff,0xfc,0x00,0x7e,0x00,0x00,0xff,0xff,0x00,0x01,0xff,0xff,0xfc,0x00,0x76,0x00,0x00,0xff,0xfe,0x00,0x07,0x9f,0xff,0xf8,0x00,0x36,0x00,0x00,0xff,0xfc,0x00,0x03,0x3f,0xff,0xf0,0x00,0x00,0x00,0x00,0xff,0xf8,0x00,0x00,0xff,0xc7,0xf0,0x00,0x06,0x00,0x00,0xff,0xf0,0x00,0x0f,0xff,0xfc,0x00,0x3e,0x0c,0x00,0x00,0xff,0xe0,0x00,0x07,0xff,0xf0,0x00,0x3e,0x30,0x00,0x00,0xff,0xe0,0x00,0x07,0xff,0xff,0x00,0x3c,0x78,0x00,0x00,0xff,0xc0,0x00,0x0f,0xff,0xff,0xc0,0x3e,0x04,0x00,0x00,0xff,0xc0,0x00,0x07,0xff,0xff,0xc0,0x3e,0x00,0x00,0x00,0xff,0x80,0x00,0x05,0xff,0xff,0xe0,0x00,0x3c,0x00,0x00,0xff,0x80,0x00,0x04,0xff,0xdf,0xe0,0x20,0x76,0x00,0x00,0xff,0x00,0x00,0x04,0xff,0xdf,0xe0,0x20,0x56,0x00,0x00,0xff,0x00,0x00,0x02,0xff,0xef,0xf0,0x3e,0x52,0x00,0x00,0xff,0x00,0x00,0x07,0xff,0xff,0xf0,0x22,0x5e,0x00,0x00,0xff,0x00,0x00,0x07,0xff,0xff,0xf0,0x22,0x00,0x00,0x00,0xff,0x80,0x00,0x0f,0xff,0xff,0xf0,0x20,0x16,0x00,0x00,0xff,0x80,0x00,0x1f,0xff,0xff,0xf0,0x3e,0x10,0x00,0x00,0xff,0x80,0x00,0x0f,0xff,0xff,0xf0,0x3e,0x3c,0x00,0x00,0xff,0xc4,0x00,0x07,0xff,0xf7,0xf0,0x3e,0x2e,0x00,0x00,0xff,0xc0,0x00,0x07,0xff,0xef,0xe0,0x3e,0x7a,0x00,0x00,0xff,0xc0,0x00,0x07,0xff,0xef,0xe0,0x3e,0x7c,0x00,0x00,0xff,0xc0,0x00,0x04,0xff,0xdf,0xc0,0x2e,0x66,0x00,0x00,0xff,0xc0,0x00,0x04,0x7f,0xff,0xc0,0x3e,0x00,0x00,0x00,0xff,0xe0,0x00,0x07,0xff,0xff,0x80,0x3e,0x7e,0x00,0x00,0xff,0xf0,0x00,0x06,0xff,0xfc,0x00,0x3e,0x7a,0x00,0x00,0xff,0xf0,0x00,0x0f,0xff,0xfe,0x3c,0x3e,0x7e,0x00,0x00,0xff,0xfc,0x00,0x07,0xff,0xff,0xfe,0x3e,0x76,0x00,0x00,0xff,0xff,0x80,0x01,0xff,0xff,0xfe,0x1a,0x7c,0x00,0x00,0xff,0xff,0x00,0x00,0xf3,0xff,0xff,0x00,0x20,0x00,0x00,0xff,0xff,0x80,0x00,0xc3,0xff,0xff,0x80,0x4a,0x00,0x00,0xff,0xff,0xe0,0x00,0x1f,0xff,0xff,0x80,0x7e,0x00,0x00,0xff,0xff,0xff,0x07,0xff,0xff,0xff,0xc0,0x7e,0x00,0x00,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xe0,0x7e,0x00,0x00,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xe0,0x7e,0x00,0x00,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf0,0x6a,0x00,0x00,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf0,0x00,0x00,0x00,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf0,0x00,0x00,0x00,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf8,0x00,0x00,0x00,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf8,0x00,0x00,0x00,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xfc,0x00,0x00,0x00,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xfc,0x00,0x00,0x00,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xfe,0x00,0x00,0x00,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xfe,0x00,0x00,0x00,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x80,0x00,0x00,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xc0,0x00,0x00,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xfc,0x00,0x00,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xfe,0x00,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xc0 };

// width: 60, height: 60
const unsigned char bbb[] = { 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf0,0xff,0xff,0xff,0xfe,0x00,0xff,0xff,0xf0,0xff,0xff,0xff,0xe3,0xff,0x8f,0xff,0xf0,0xff,0xff,0xff,0x9f,0xff,0xf3,0xff,0xf0,0xff,0xff,0xe0,0x7f,0xff,0xf8,0x9f,0xf0,0xff,0xff,0xfd,0xbf,0xff,0xe7,0x7f,0xf0,0xff,0xff,0xfb,0xdf,0xff,0xcf,0xbf,0xf0,0xff,0xff,0xf7,0xdf,0xff,0xdf,0xdf,0xf0,0xff,0xff,0xef,0xff,0xff,0xff,0xef,0xf0,0xff,0xff,0xdf,0xff,0xff,0xff,0xf7,0xf0,0xff,0xff,0x80,0x07,0xff,0x80,0x07,0xf0,0xff,0xfe,0x7f,0xf9,0xfe,0x7f,0xf3,0xf0,0xff,0xfc,0x3f,0xfe,0xfc,0x3f,0xfd,0xf0,0xff,0xfc,0x1f,0xfe,0xf8,0x3f,0xfe,0xf0,0xff,0xf8,0x38,0x7f,0x78,0x20,0xfe,0xf0,0xff,0xfc,0x0f,0x80,0xff,0x3f,0x8e,0xf0,0xff,0xfe,0xff,0xff,0xff,0xff,0xf1,0xf0,0xff,0xfe,0xff,0xff,0xff,0xff,0xfe,0xf0,0xff,0xfe,0xff,0xff,0xff,0xff,0xfe,0xf0,0xff,0xfe,0xff,0xff,0xff,0xff,0xfe,0xf0,0xff,0xfe,0xff,0xff,0xff,0xff,0xfe,0xf0,0xff,0xff,0xff,0xff,0xff,0xff,0xfe,0xf0,0xff,0xff,0xff,0xff,0xff,0xff,0xfe,0xf0,0xff,0xff,0xff,0xff,0xff,0xff,0x7e,0xf0,0xff,0xf8,0xff,0xff,0xff,0xff,0x7e,0xf0,0xff,0xf6,0xdf,0xff,0xff,0xff,0x7e,0xf0,0xff,0xf4,0x5f,0xff,0xff,0xfe,0xfe,0xf0,0xff,0xf3,0x2f,0xff,0xff,0xfe,0xff,0xf0,0xff,0xfb,0x8f,0xff,0xff,0xfd,0xfd,0xf0,0xff,0xfb,0xc7,0xff,0xff,0xfd,0xfd,0xf0,0xff,0xfd,0xe3,0xff,0xff,0xfb,0xfb,0xf0,0xff,0xfd,0xf1,0xff,0xff,0xf7,0xfb,0xf0,0xff,0xf0,0xfc,0xff,0xff,0xef,0xf7,0xf0,0xff,0xce,0x7b,0x3f,0xff,0x9f,0xf7,0xf0,0xff,0xbf,0x7d,0xc7,0xf8,0x7f,0xef,0xf0,0xff,0x7f,0xbd,0xf8,0x07,0xff,0xdf,0xf0,0xfc,0xff,0xbe,0xff,0xff,0xff,0x3f,0xf0,0xfb,0xff,0xde,0xff,0xff,0xfe,0xff,0xf0,0xf7,0xfb,0xdf,0x7f,0xff,0xf3,0xff,0xf0,0xff,0xe1,0xdf,0x8f,0xff,0x8f,0xff,0xf0,0xff,0xef,0xef,0x98,0x00,0xff,0xff,0xf0,0xff,0xef,0xef,0xcf,0xff,0xff,0xff,0xf0,0xff,0xf7,0xcf,0xff,0xff,0xff,0xff,0xf0,0xff,0xe3,0xb7,0xff,0xff,0xff,0xff,0xf0,0xff,0xdc,0x77,0xff,0xff,0xff,0xff,0xf0,0xff,0xbf,0xfb,0xff,0xff,0xff,0xff,0xf0,0xf6,0x7f,0xfd,0xff,0xff,0xff,0xff,0xf0,0xf9,0xff,0xfe,0x0f,0xff,0xff,0xff,0xf0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf0 };

// width: 64, height: 65
const unsigned char aaa[] = 
{   0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x60,0x00,0x00,0x00,
0x00,0x00,0x04,0x00,0xf0,0x00,0x00,0x00,0x00,0x00,0x0f,0x00,0xfc,0x00,0x00,0x00,0x00,0x00,
0x1f,0x81,0xc4,0x00,0x00,0x00,0x00,0x40,0x3f,0xe1,0xb6,0x00,0x00,0x00,0x00,0xc0,0x7f,0xf3,
0xfe,0x00,0x00,0x00,0x00,0x80,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0x00,0xf9,0x7f,0xff,0x00,
0x00,0x00,0x00,0x01,0xf7,0xbf,0xef,0x00,0x00,0x00,0x00,0x01,0xff,0xff,0xc7,0x00,0x00,0x00,
0x00,0x03,0xfe,0xff,0x83,0x00,0x00,0x00,0x00,0x03,0xfc,0x7f,0x8b,0x00,0x00,0x00,0x00,0x03,
0xf8,0x3f,0xa3,0x00,0x00,0x00,0x00,0x07,0xf8,0x3f,0xa3,0x00,0x00,0x00,0x00,0x07,0xfa,0x3f,
0x8b,0x00,0x00,0x00,0x00,0x07,0xf0,0x7f,0x8a,0x00,0x00,0x00,0x00,0x07,0xf0,0xdf,0x8a,0x00,
0x00,0x00,0x00,0x07,0xf0,0x5f,0x9a,0x00,0x00,0x00,0x00,0x03,0xf0,0xdf,0xbe,0x00,0x00,0x00,
0x00,0x01,0xf9,0xbf,0xc7,0x00,0x08,0x00,0x00,0x01,0xfb,0xbf,0xdf,0x80,0x00,0x00,0x00,0x2d,0xf8,0x7f,0xff,0x80,0x00,0x00,0x1c,0x5e,0xff,0xff,0x1f,0x00,0x00,0x00,0x3e,0x5e,0xff,0xff,0x9f,0x00,0x00,0x00,0x3e,0x1e,0x7f,0xbf,0xfe,0x00,0x00,0x00,0x1f,0x1f,0x7f,0xdf,0xfc,0x00,0x00,0x00,0x1f,0x1f,0x7f,0xc0,0x78,0x00,0x00,0x00,0x0f,0x9f,0x7f,0xe1,0xf0,0x00,0x00,0x00,0x0f,0x9f,0x7f,0xe3,0xe0,0x00,0x00,0x00,0x0f,0x8f,0x3f,0xe3,0x80,0x00,0x00,0x00,0x07,0xcf,0x07,0xfc,0x00,0x00,0x00,0x00,0x07,0xcf,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0xcf,0x07,0xe0,0x00,0x00,0x00,0x00,0x03,0xcf,0x3d,0xbf,0xbc,0x00,0x00,0x00,0x03,0xc0,0x3f,0xff,0xde,0x00,0x00,0x00,0x00,0x67,0x7f,0xff,0xcf,0x00,0x00,0x00,0x07,0xaf,0x3f,0xff,0x6f,0x80,0x00,0x00,0x07,0x8f,0xbb,0xff,0xb7,0x80,0x00,0x00,0x1f,0xcf,0xbb,0xff,0xb7,0xc0,0x00,0x00,0x0f,0xce,0x3b,0xff,0xbb,0xc0,0x00,0x00,0x0b,0xc0,0x9f,0xff,0xdb,0xf0,0x00,0x00,0x0d,0xcf,0x9d,0xff,0xd9,0xfc,0x00,0x00,0x0e,0x37,0x9d,0xff,0xdd,0xff,0x00,0x00,0x17,0xff,0xbd,0xff,0xdd,0xff,0x80,0x00,0x13,0xff,0xbd,0xff,0xdd,0xff,0xe0,0x00,0x09,0xff,0x3d,0xff,0xec,0xff,0xf0 };


// width: 64, height: 64
const unsigned char logo[]  = { 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0xf8,0xc0,0x00,0x7f,0xff,0xc0,0x00,0x1f,0xff,0xe0,0x00,0xff,0xff,0xe0,0x00,0x7f,0xff,0xe0,0x00,0xff,0xff,0xe0,0x00,0xff,0xff,0xe0,0x00,0xff,0xff,0xe0,0x01,0xf8,0x07,0xe0,0x00,0x00,0x03,0xc0,0x01,0xf0,0x03,0xe0,0x00,0x00,0x07,0xc0,0x03,0xe0,0x01,0xe0,0x00,0x00,0x07,0x80,0x07,0xc0,0x01,0xe0,0x00,0x00,0x0f,0x00,0x07,0xc0,0x01,0xe0,0x00,0x00,0x1f,0x00,0x07,0x80,0x01,0xe0,0x00,0x00,0x1e,0x00,0x0f,0x80,0x01,0xe0,0x00,0x00,0x3e,0x00,0x0f,0x00,0x01,0xe0,0x00,0x00,0x7c,0x00,0x0f,0x00,0x01,0xe0,0x00,0x00,0x78,0x00,0x0f,0x00,0x01,0xe0,0x00,0x00,0xf8,0x00,0x0f,0x00,0x01,0xe0,0x00,0x01,0xf0,0x00,0x0f,0x00,0x01,0xe0,0x00,0x01,0xe0,0x00,0x0f,0x00,0x01,0xe0,0x00,0x03,0xe0,0x00,0x0f,0x00,0x01,0xe0,0x00,0x07,0xc0,0x00,0x0f,0x00,0x01,0xe0,0x00,0x07,0x80,0x00,0x0f,0x80,0x01,0xe0,0x00,0x0f,0x80,0x00,0x0f,0x80,0x01,0xe0,0x00,0x0f,0x00,0x00,0x07,0x80,0x01,0xe0,0x00,0x1e,0x00,0x00,0x07,0xc0,0x01,0xe0,0x00,0x3e,0x00,0x00,0x07,0xc0,0x01,0xe0,0x00,0x3c,0x00,0x00,0x03,0xe0,0x01,0xe0,0x00,0x78,0x00,0x00,0x03,0xf0,0x03,0xe0,0x00,0xf8,0x00,0x00,0x01,0xf8,0x07,0xe0,0x00,0xf0,0x00,0x00,0x00,0xff,0xff,0xff,0xff,0xff,0xff,0xf0,0x00,0x7f,0xff,0xff,0xff,0xff,0xff,0xf0,0x00,0x1f,0xff,0xff,0xff,0xff,0xff,0xf0,0x00,0x07,0xf0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 };

// #include "../../temp_humi_demo/motor.h"
// #include "../../temp_humi_demo/light.h"
// #include "../../temp_humi_demo/temp_data.h"

char temp_str[40]={0};
char humi_str[40]={0};
char fan_str[40]={0};
char light_str[40]={0};

#define SHOW_STRING "OpenHarmony"
void test_led_screen(void)
{	
  
    printf("before oled clear \r\n");
    OLED_Init();			   //初始化OLED  
    
    int x = 0;
    int y = 20;
    int dir = 1;
    while(1){    
        OLED_Clear(0);    //清屏（全黑）
        /*OLED作业
        GUI_ShowString(0,0,"name",16,1);
        GUI_ShowChinese(x,16,16,"曹祚衡",1);
        GUI_ShowChinese(x,32,16,"董浩杰",1);
        GUI_ShowChinese(x,48,16,"李伟力",1);
        // GUI_DrawBMP(0,0,64,65, aaa, 1); 
        GUI_DrawBMP(64,0,60,60, bbb, 1); 
        // GUI_DrawBMP(64,0,82,64, dj, 1); 
        // GUI_FillCircle(x, y, 1, 20);
        if(x>16 || x < 0) {
            dir = !dir;
            
        }
        if(dir){
            x+=5;
        }else {
            x-=5;
        }
        */
        sprintf(temp_str,"温度:%.02fC",g_temp);
        sprintf(humi_str,"湿度:%.02f%%",g_humi);
        printString(0,0,16,temp_str);
        printString(0,20,16,humi_str);
        OLED_Display();
        sleep(1);

    }
   
}

